#include "mystdio.hpp"

using namespace GlibcModule;

int main()
{
    MyFile* file=file->MyFopen("log.txt","a");
    if(file==nullptr)
    {
        printf("open file failed\n");
        return 1;
    }

    int cnt=5;
    while(cnt--)
    {
        char* msg=(char*)"taddle legacy ";
        int len=strlen(msg);

        file->MyFwrite(file,msg,len);
        file->MyFflush(file);

        printf("%s\n",file->GetOutBuffer());
        sleep(1);
    }

    file->MyFclose(file);

    return 0;
}